package com.designpattern.demo.ui;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import butterknife.ButterKnife;

/**
 * Created by lingchen on 2019/11/24. 22:13
 * mail:lingchen52@foxmail.com
 */
public abstract class BaseActivity extends AppCompatActivity {

    public static String TAG;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentResId());
        ButterKnife.bind(this);
        TAG = this.getClass().getSimpleName();
        initView();
        initData();
    }

    protected abstract int getContentResId();

    protected abstract void initView();

    protected abstract void initData();
}
